#include <STC15F2K60S2.H>
#include "init,h"
void InitHC573(unsigned char channel)
{
	switch(channel)
	{
		case 4:
			P2 = (P2 & 0x1f) | 0x80;
		break;
		case 5:
			P2 = (P2 & 0x1f) | 0xa0;
		break;
		case 6:
			P2 = (P2 & 0x1f) | 0xc0;
		break;
		case 7:
			P2 = (P2 & 0x1f) | 0xe0;
		break;
		case 0:
			P2 = (P2 & 0x1f) | 0x00;
		break;		
	}
}

void InitSys()
{
		InitHC573(5);
		P2 = 0x80;
		InitHC573(4);
		P0 = 0xff;
	
}